\hypertarget{spi__drv_8h}{\section{drv/spi\-\_\-drv.h File Reference}
\label{spi__drv_8h}\index{drv/spi\-\_\-drv.\-h@{drv/spi\-\_\-drv.\-h}}
}


S\-P\-I D\-R\-I\-V\-E\-R F\-O\-R M\-P\-C5604\-B\-\_\-\-M\-V27.  


{\ttfamily \#include \char`\"{}M\-P\-C5604\-B\-\_\-0\-M27\-V\-\_\-0102.\-h\char`\"{}}\\*
{\ttfamily \#include $<$string.\-h$>$}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct___s_p_i___d_r_v}{\-\_\-\-S\-P\-I\-\_\-\-D\-R\-V}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{spi__drv_8h_a407e231521f36cb214629f1c210ebb33}{S\-P\-I\-\_\-\-E\-R\-R\-O\-R}()~; 	  while(1)\{\}
\item 
\hypertarget{group__group1_ga970be944bbbac5f4c297d2ed51af71ee}{\#define {\bfseries S\-P\-I\-\_\-\-B\-A\-U\-D\-\_\-25000}~0x29}\label{group__group1_ga970be944bbbac5f4c297d2ed51af71ee}

\item 
\hypertarget{group__group1_gaecc4730b81eb512cd6189473a70a2145}{\#define {\bfseries S\-P\-I\-\_\-\-B\-A\-U\-D\-\_\-62500}~0x09}\label{group__group1_gaecc4730b81eb512cd6189473a70a2145}

\item 
\hypertarget{group__group1_gaead2c547a8d3eb217fe1d5c898245334}{\#define {\bfseries S\-P\-I\-\_\-\-B\-A\-U\-D\-\_\-100000}~0x27}\label{group__group1_gaead2c547a8d3eb217fe1d5c898245334}

\item 
\hypertarget{group__group1_ga5ece894b3ae931673cee8e04e4dcb97b}{\#define {\bfseries S\-P\-I\-\_\-\-B\-A\-U\-D\-\_\-500000}~0x06}\label{group__group1_ga5ece894b3ae931673cee8e04e4dcb97b}

\item 
\hypertarget{group__group1_ga94dbbc530f6e24997ec477b7417b3466}{\#define {\bfseries S\-P\-I\-\_\-\-B\-A\-U\-D\-\_\-1000000}~0x05}\label{group__group1_ga94dbbc530f6e24997ec477b7417b3466}

\item 
\hypertarget{group__group1_ga8f88fba39a8fac6bf674df6e525ba09f}{\#define {\bfseries S\-P\-I\-\_\-\-B\-A\-U\-D\-\_\-4000000}~0x03}\label{group__group1_ga8f88fba39a8fac6bf674df6e525ba09f}

\item 
\#define \hyperlink{group__group2_ga9b5018e9d6279fd4f2416aa3891fb106}{S\-P\-I\-\_\-\-D\-E\-L\-A\-Y\-\_\-\-D\-E\-F\-A\-U\-L\-T}~0x00080808
\begin{DoxyCompactList}\small\item\em Default values specified at baud rate of 62500\-Hz (or higher) for the driver, system clock being 64\-M\-Hz. \end{DoxyCompactList}\item 
\#define \hyperlink{group__group3_gaded631ad24482040bcf4ee3a9620299a}{S\-P\-I\-\_\-\-M\-A\-X\-\_\-\-D\-A\-T\-A\-\_\-\-S\-I\-Z\-E}~128
\item 
\#define \hyperlink{group__group3_ga61732f4cc91effc15fdea77bf11bd6a7}{S\-P\-I\-\_\-\-F\-R\-A\-M\-E\-S\-I\-Z\-E}~16
\item 
\#define \hyperlink{group__group4_gae8ecf743145569e5b67dadd2f3b37cc7}{D\-S\-P\-I0\-\_\-\-P\-O\-R\-T}~'A'
\item 
\#define \hyperlink{group__group4_gab670645d0590ef0f380f06a9bc1e8ffc}{D\-S\-P\-I1\-\_\-\-P\-O\-R\-T}~'C'
\item 
\#define \hyperlink{group__group4_gabb12b5473a73d2b6fd70881a6bcd1eaf}{D\-S\-P\-I2\-\_\-\-P\-O\-R\-T}~'E'
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__group5_gaa3f08b6b790aa1596d6f41a122c17aad}{void \hyperlink{group__group5_gaa3f08b6b790aa1596d6f41a122c17aad}{initialise\-\_\-\-S\-P\-I\-\_\-\-D\-R\-I\-V\-E\-R} (void)}\label{group__group5_gaa3f08b6b790aa1596d6f41a122c17aad}

\begin{DoxyCompactList}\small\item\em Initialisation function for S\-P\-I driver. Initializes the S\-P\-I variable with appropriate assingments on function pointers and activating T\-C\-I handler etc. Must be called before doing anything with the driver. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__group5_ga2365cce3281e8859c38a37edaced7e89}{struct \hyperlink{struct___s_p_i___d_r_v}{\-\_\-\-S\-P\-I\-\_\-\-D\-R\-V} \hyperlink{group__group5_ga2365cce3281e8859c38a37edaced7e89}{S\-P\-I} \mbox{[}3\mbox{]}}\label{group__group5_ga2365cce3281e8859c38a37edaced7e89}

\begin{DoxyCompactList}\small\item\em S\-P\-I driver instances. Variables defined on the driver structure, providing an Object Oriented user interface for using the driver.\par
. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
S\-P\-I D\-R\-I\-V\-E\-R F\-O\-R M\-P\-C5604\-B\-\_\-\-M\-V27. \begin{DoxyAuthor}{Author}
Serdar S\-A\-H\-I\-N 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
1.\-0 
\end{DoxyVersion}
\begin{DoxyDate}{Date}
july 2013
\end{DoxyDate}
A driver for transferring 16-\/bit data arrays (with or without interrupts, to run on the background), with an Object Oriented user interface.

Serdar S\-A\-H\-I\-N -\/ L\-A\-A\-S -\/ 2013 

Definition in file \hyperlink{spi__drv_8h_source}{spi\-\_\-drv.\-h}.



\subsection{Macro Definition Documentation}
\hypertarget{spi__drv_8h_a407e231521f36cb214629f1c210ebb33}{\index{spi\-\_\-drv.\-h@{spi\-\_\-drv.\-h}!S\-P\-I\-\_\-\-E\-R\-R\-O\-R@{S\-P\-I\-\_\-\-E\-R\-R\-O\-R}}
\index{S\-P\-I\-\_\-\-E\-R\-R\-O\-R@{S\-P\-I\-\_\-\-E\-R\-R\-O\-R}!spi_drv.h@{spi\-\_\-drv.\-h}}
\subsubsection[{S\-P\-I\-\_\-\-E\-R\-R\-O\-R}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-P\-I\-\_\-\-E\-R\-R\-O\-R(
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)~; 	  while(1)\{\}}}\label{spi__drv_8h_a407e231521f36cb214629f1c210ebb33}
An inifite loop that is entered on a detectable error on the driver, usually related to missing or inappropriate user parameters. 

Definition at line 143 of file spi\-\_\-drv.\-h.

